from playwright.sync_api import sync_playwright
def test_baidu():
    with sync_playwright() as p:
        page = p.chromium.launch(headless=False).new_page()
        page.goto('https://www.baidu.com/')
        page.fill('input[id="kw"]','web端自动化测试')
        page.keyboard.down('Enter')
        page.hover('#u > a.pf')
        page.click('span[class="set"]')